<%@page import="java.util.Map"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.HashMap"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title>Search Iterm</title>
	<link rel="stylesheet" href="css/jquery.mobile-1.3.2.min.css" />
	<link rel="stylesheet" href="css/SearchAnything.css" />
    <script type="text/javascript"  src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.mobile-1.3.2.min.js"></script>
	<style>
	.tdClass{
	text-align:center; 
	font-weight:bold;
	
	}
	</style>	

  <script type="text/javascript">
  $(document).ready(function(){
 	 $.mobile.ajaxEnabled = false;


  $('#editbtn').bind('click',function(){
		if($(this).val()=='Edit'){
			$('.editable').removeAttr('readonly');
			$(this).prev('span').text('Cancel');
			$(this).val('Cancel');
		}else{
			restore();
			$('.editable').attr('readonly','readonly');	
			$(this).prev('span').text('Edit');
			$(this).val('Edit');		
		}
  });
 });
	
  function restore(){
		$.each($('.editable'),function(){
			if($(this).val().trim()==""){
				$(this).val($(this).attr('currentValue'));
			}
			});
  }
   </script>
 </head>
 <body>
  <div data-theme="c" data-role="page" class="searchanything">  
   <div data-position="fixed" data-role="header" data-theme="b">   
  <a href="menudisplay" data-role="buttun" data-icon="home">Menu</a>
    <h1>  
     	Information
    </h1>  
   </div>  
   <div align="center" data-role="content">
   <h1>PARVATI SOLVENTS EXTRACTION PVT LTD</h1>
		<h3>GUT NO.76, KHADGAON,TALUKA: BADNAPUR,DISTRICT:JALNA-431203,MAHARASHTRA,INDIA</h3>
   <form action="saveinfo1" method="POST">
    <%
    HashMap dataMap =(HashMap)session.getAttribute("barcodeadmindata");
    Iterator iteratorMap = dataMap.entrySet().iterator();
    
    Map.Entry datainfoMap = null;
	HashMap businessMap = null;
	 
    if(iteratorMap.hasNext()){
		  datainfoMap = (Map.Entry) iteratorMap.next();
		  businessMap = (HashMap) datainfoMap.getValue();
		  
    }	 
    
    %>
   
    
    <table class="dataTable" data-theme="c" style="border:none; border-collapse:collapse;" border="1" width="80%">
    <tr><td class="tdClass">Barcode Number</td><td><input type="text" name="barcode" class="noneditable" readonly="readonly" value="<%=datainfoMap.getKey() %>"/></td></tr>
     <tr><td  class="tdClass">Broker Name</td><td><input type="text" name="brockername" class="noneditable" readonly="readonly" value="<%=businessMap.get("businessBrokerName")%>"/></td></tr>
      <tr><td class="tdClass">Customer Name</td><td><input type="text" name="customername" class="noneditable" readonly="readonly" value="<%=businessMap.get("businesscustomerName")%>"/></td></tr>
       <tr><td class="tdClass">Commision Agent Name</td><td><input type="text" name="commitionagent" class="noneditable" readonly="readonly" value="<%=businessMap.get("businessCommisionAgentName")%>"/></td></tr>
        <tr><td class="tdClass">Rst No.</td><td><input type="text" name="businessRSTNo" class="editable" readonly="readonly" value="<%=businessMap.get("businessRSTNo")%>" currentValue="<%=businessMap.get("businessRSTNo")%>"/></td></tr>
         <tr><td class="tdClass">Vehicle No</td><td><input type="text" name="businessVehicleNo" class="editable" readonly="readonly" value="<%=businessMap.get("businessVehicleNo")%>" currentValue="<%=businessMap.get("businessVehicleNo")%>"/></td></tr>
          <tr><td class="tdClass">Commodity</td><td><input type="text" name="businessCommodity" class="editable" readonly="readonly" value="<%=businessMap.get("businessCommodity")%>" currentValue="<%=businessMap.get("businessCommodity")%>"/></td></tr>
           <tr><td class="tdClass">No of Bags</td><td><input type="text" name="businessNoOfBags" class="editable" readonly="readonly" value="<%=businessMap.get("businessNoOfBags")%>" currentValue="<%=businessMap.get("businessNoOfBags")%>"/></td></tr>
            <tr><td class="tdClass">PO No</td><td><input type="text" name="businessPONo" class="editable" readonly="readonly" value="<%=businessMap.get("businessPONo")%>" currentValue="<%=businessMap.get("businessPONo")%>"/></td></tr>
             <tr><td class="tdClass">Gross Weight</td><td><input type="text" name="businessGrossWeight" class="editable" readonly="readonly" value="<%=businessMap.get("businessGrossWeight")%>" currentValue="<%=businessMap.get("businessGrossWeight")%>"/></td></tr>
              <tr><td class="tdClass">Tare Weight</td><td><input type="text" name="businessTareWeight" class="editable" readonly="readonly" value="<%=businessMap.get("businessTareWeight")%>" currentValue="<%=businessMap.get("businessTareWeight")%>"/></td></tr>
               <tr><td class="tdClass">Net Weight</td><td><input type="text" name="businessNetWeight" class="editable" readonly="readonly" value="<%=businessMap.get("businessNetWeight")%>" currentValue="<%=businessMap.get("businessNetWeight")%>"/></td></tr>
                <tr><td class="tdClass">Date</td><td><input type="text" name="businessdate" class="editable" readonly="readonly" value="<%=businessMap.get("businessdate")%>" currentValue="<%=businessMap.get("businessdate")%>"/></td></tr>
    <tr><td class="tdClass">Rate</td><td><input type="text" name="businessRate" class="editable" readonly="readonly" value="<%=businessMap.get("businessRate")%>" currentValue="<%=businessMap.get("businessRate")%>"/></td></tr>
    <tr><td class="tdClass">Gross Amount</td><td><input type="text" name="businessGrossAmount" class="editable" readonly="readonly" value="<%=businessMap.get("businessGrossAmount")%>" currentValue="<%=businessMap.get("businessGrossAmount")%>"/></td></tr>
    <tr><td class="tdClass">Less Rebate</td><td><input type="text" name="businessLessRebate" class="editable" readonly="readonly" value="<%=businessMap.get("businessLessRebate")%>" currentValue="<%=businessMap.get("businessLessRebate")%>"/></td></tr>
    <tr><td class="tdClass">cash Discount</td><td><input type="text" name="businesscashDiscount" class="editable" readonly="readonly" value="<%=businessMap.get("businesscashDiscount")%>" currentValue="<%=businessMap.get("businesscashDiscount")%>"/></td></tr>
    <tr><td class="tdClass">Advance</td><td><input type="text" name="businessAdvance" class="editable" readonly="readonly" value="<%=businessMap.get("businessAdvance")%>" currentValue="<%=businessMap.get("businessAdvance")%>"/></td></tr>
    <tr><td class="tdClass">Total Rebate</td><td><input type="text" name="businessTotalRebate" class="editable" readonly="readonly" value="<%=businessMap.get("businessTotalRebate")%>" currentValue="<%=businessMap.get("businessTotalRebate")%>"/></td></tr>
    <tr><td class="tdClass">Total Paid</td><td><input type="text" name="businessTotalPaid" class="editable" readonly="readonly" value="<%=businessMap.get("businessTotalPaid")%>" currentValue="<%=businessMap.get("businessTotalPaid")%>"/></td></tr>
    <tr><td class="tdClass">Weighing Machine User</td><td><input type="text" name="businessWeighingMachineUser" class="editable" readonly="readonly" value="<%=businessMap.get("businessWeighingMachineUser")%>" currentValue="<%=businessMap.get("businessWeighingMachineUser")%>"/></td></tr>
    <tr><td class="tdClass">Lab user</td><td><input type="text" name="businessLabUser" class="editable" readonly="readonly" value="<%=businessMap.get("businessLabUser")%>" currentValue="<%=businessMap.get("businessLabUser")%>"/></td></tr>
    <tr><td class="tdClass">Damage Seeds Bench Mark</td><td><input type="text" name="businessDamageSeeds" class="editable" readonly="readonly" value="<%=businessMap.get("businessDamageSeeds")%>" currentValue="<%=businessMap.get("businessDamageSeeds")%>"/></td></tr>
    <tr><td class="tdClass">SandSilica BenchMark</td><td><input type="text" name="businessSandSilica" class="editable" readonly="readonly" value="<%=businessMap.get("businessSandSilica")%>" currentValue="<%=businessMap.get("businessSandSilica")%>"/></td></tr>
    <tr><td class="tdClass">Moisture Bench Mark</td><td><input type="text" name="businessMoisture" class="editable" readonly="readonly" value="<%=businessMap.get("businessMoisture")%>" currentValue="<%=businessMap.get("businessMoisture")%>"/></td></tr>
    <tr><td class="tdClass">Excess Damage seeds</td><td><input type="text" name="businessExcessDamage" class="editable" readonly="readonly" value="<%=businessMap.get("businessExcessDamage")%>" currentValue="<%=businessMap.get("businessExcessDamage")%>"/></td></tr>
    <tr><td class="tdClass">Excess SandSilica</td><td><input type="text" name="businessExcessSandSilica" class="editable" readonly="readonly" value="<%=businessMap.get("businessExcessSandSilica")%>" currentValue="<%=businessMap.get("businessExcessSandSilica")%>"/></td></tr>
    <tr><td class="tdClass">Excess Moisture</td><td><input type="text" name="businessExcessMoisture" class="editable" readonly="readonly" value="<%=businessMap.get("businessExcessMoisture")%>" currentValue="<%=businessMap.get("businessExcessMoisture")%>"/></td></tr>
    <tr><td class="tdClass">Damage Amount Cut</td><td><input type="text" name="businessDamageAmountCut" class="editable" readonly="readonly" value="<%=businessMap.get("businessDamageAmountCut")%>" currentValue="<%=businessMap.get("businessDamageAmountCut")%>"/></td></tr>
    <tr><td class="tdClass">SandSilica Cut</td><td><input type="text" name="businessSandSilicaAmountCut" class="editable" readonly="readonly" value="<%=businessMap.get("businessSandSilicaAmountCut")%>" currentValue="<%=businessMap.get("businessSandSilicaAmountCut")%>"/></td></tr>
    <tr><td class="tdClass">Moisture Cut</td><td><input type="text" name="businessMoistureAmountCut" class="editable" readonly="readonly" value="<%=businessMap.get("businessMoistureAmountCut")%>" currentValue="<%=businessMap.get("businessMoistureAmountCut")%>"/></td></tr>
    <tr><td class="tdClass">Unloading Charges</td><td><input type="text" name="businessUnloading" class="editable" readonly="readonly" value="<%=businessMap.get("businessUnloading")%>" currentValue="<%=businessMap.get("businessUnloading")%>"/></td></tr>
    <tr><td class="tdClass">Add Dalali</td><td><input type="text" name="businessAddDalali" class="editable" readonly="readonly" value="<%=businessMap.get("businessAddDalali")%>" currentValue="<%=businessMap.get("businessAddDalali")%>"/></td></tr>
    </table>
		
		<table>
			<tr><td><input type="button" value="Edit" id="editbtn"/> <td><input type="submit" value="Save" id="editbtn"/></td></tr>
		</table>	
   </form>
  </div>
  </div>
  </body>
</html>